Skip to main content

Configuring Webhooks

Webhooks are the primary method for receiving updates from our API. They are given the highest priority, ensuring updates are delivered to them first. Therefore, it is crucial to properly configure your webhooks to ensure you receive updates promptly and reliably. We recommend that you do not use one of the public API keys to configure the webhook in the testing environment, as this makes configuration difficult since any user can use them.

Webhooks configuration

Request

POST 'https://apisandbox.delbank.com.br/baas/api/v1/webhooks'

Headers

NameDescription
x-delbank-api-keyRequired. API key

Body

NameTypeDescription
eventTypeenumRequired. Type of event to be monitored/listened
urlstringRequired. API URL of the client system that will receive the webhook information
authorizationSchemeenumType of authorization that must be used when executing the endpoint call (according to the url field).
Domains:
- BASIC
- BEARER
- HEADER
authorizationstringInformation that will be sent in the request header to the endpoint

Example

Configuring the webhook with Authentication Basic

{
"eventType": "PIX_RECEIVED",
"url": "https://example.com.br/webhooks/v1/bankslips",
"authorization": "bG9naW46cGFzc3dvcmQ=",
"authorizationScheme": "BASIC"
}

Configuring the webhook with Authentication Bearer

{
"eventType": "PIX_RECEIVED",
"url": "https://example.com.br/webhooks/v1/bankslips",
"authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"authorizationScheme": "BEARER"
}

Configuration Maintenance

EndpointHTTP MethodDescription
https://apisandbox.delbank.com.br/baas/api/v1/webhooksGETQuery all the registered webhooks registered by the API Key used in the requisition.
https://apisandbox.delbank.com.br/baas/api/v1/webhooks/:IDGETQuery webhook by ID
https://apisandbox.delbank.com.br/baas/api/v1/webhooks/:IDPATCHUpdate webhook by ID (Uses the same payload as the register webhook)
https://apisandbox.delbank.com.br/baas/api/v1/webhooks/:IDDELETERemove registered Webhook by ID

Event Types

Below is a list of event types and their meaning

NameDescriptionLink
CHARGE_PAIDPaid bankslipClick here
PIX_RECEIVEDPix received. (New webhook flow for Pix receiving only)Click here
PIX_PAYMENT_UPDATEDUpdate payment status for Pix.Click here
PIX_REFUNDEDEvent for refunds receivedClick here
PIX_REFUND_PAYMENT_UPDATEDEvent for refunds sentClick here
TRANSFER_INTERNAL_CREDITEDEvent for internal transfer receivedClick here
TRANSFER_INTERNAL_DEBITEDEvent for internal transfer sentClick here
WHITELABEL_CUSTOMER_DOCUMENTATION_REJECTEDRejected documents for a new created accountClick here
WHITELABEL_CUSTOMER_APPROVEDCustomer approved and bank account createdClick here